
#pragma once
#include <string>
#include <vector>

struct kv_t
{
	std::string key;
	std::string value;

public:
	kv_t(std::string key, std::string value)
	{
		this->key = key;
		this->value = value;
	}
};

class CWebSignHelper
{
public:
	CWebSignHelper();
	~CWebSignHelper();

public:
	std::string MakeSign(std::string data, std::string body);
	std::string MakeSign2(std::vector<kv_t> vecParams);

private:
	std::vector<kv_t> ConvertParams(std::string data);
	void SortParams(std::vector<kv_t> &vecParams);
	std::string MakeMD5(std::vector<kv_t> vecParams, std::string body);

	std::string ss;
};
